Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make Partition family of APIs use reduce_then_scan algorithm #1764

Merged
merged 9 commits into from
Aug 30, 2024

Conversation

danhoeflinger
Copy link
Contributor

@danhoeflinger danhoeflinger commented Aug 5, 2024

This PR changes partition family of scan-like algorithms to use reduce_then_scan where it is beneficial.

Moves all algorithm selection decisions to __parallel_partition_copy.


This PR is targeted to #1763, to allow for a clean diff, and is a part of the following sequence of PRs meant to be merged in order:

#1769 [MERGED] Relocate __lazy_ctor_storage to utils header
#1770 [MERGED] Use __result_and_scratch_storage within scan kernels
#1762 Add reduce_then_scan algorithm for transform scan family
#1763 Make Copy_if family of APIs use reduce_then_scan algorithm
#1764 Make Partition family of APIs use reduce_then_scan algorithm (This PR)
#1765 Make Unique family of APIs use reduce_then_scan algorithm

This work is a collaboration between @mmichel11 @adamfidel and @danhoeflinger, and based upon an original prototype by Ted Painter.

@danhoeflinger danhoeflinger force-pushed the dev/shared/copy_if_reduce_then_scan branch from 1985c58 to 973e261 Compare August 5, 2024 20:56
@danhoeflinger danhoeflinger force-pushed the dev/shared/partition_reduce_then_scan branch from 013c496 to dadb933 Compare August 5, 2024 20:57
@danhoeflinger danhoeflinger force-pushed the dev/shared/copy_if_reduce_then_scan branch from 973e261 to 91120af Compare August 6, 2024 12:52
@danhoeflinger danhoeflinger force-pushed the dev/shared/partition_reduce_then_scan branch from dadb933 to eafdcc0 Compare August 6, 2024 12:53
@danhoeflinger danhoeflinger force-pushed the dev/shared/copy_if_reduce_then_scan branch from 91120af to b517414 Compare August 6, 2024 13:02
@danhoeflinger danhoeflinger force-pushed the dev/shared/partition_reduce_then_scan branch from eafdcc0 to c7c043e Compare August 6, 2024 13:34
@danhoeflinger danhoeflinger force-pushed the dev/shared/copy_if_reduce_then_scan branch from b517414 to d85ce61 Compare August 6, 2024 14:18
@danhoeflinger danhoeflinger force-pushed the dev/shared/partition_reduce_then_scan branch from c7c043e to d2f9639 Compare August 6, 2024 14:19
@danhoeflinger danhoeflinger force-pushed the dev/shared/copy_if_reduce_then_scan branch from d85ce61 to df6abff Compare August 6, 2024 17:18
@danhoeflinger danhoeflinger force-pushed the dev/shared/partition_reduce_then_scan branch from d2f9639 to 6cbb5dd Compare August 6, 2024 17:19
@danhoeflinger danhoeflinger force-pushed the dev/shared/copy_if_reduce_then_scan branch from df6abff to e33efaa Compare August 6, 2024 17:26
@danhoeflinger danhoeflinger force-pushed the dev/shared/partition_reduce_then_scan branch from 6cbb5dd to 06da0e2 Compare August 6, 2024 17:26
@danhoeflinger danhoeflinger force-pushed the dev/shared/copy_if_reduce_then_scan branch from e33efaa to 5f4882a Compare August 6, 2024 18:10
@danhoeflinger danhoeflinger force-pushed the dev/shared/partition_reduce_then_scan branch from 06da0e2 to edf26c5 Compare August 6, 2024 18:11
@danhoeflinger danhoeflinger added this to the 2022.7.0 milestone Aug 6, 2024
@danhoeflinger danhoeflinger force-pushed the dev/shared/copy_if_reduce_then_scan branch from 5f4882a to 522d0af Compare August 6, 2024 19:02
@danhoeflinger danhoeflinger force-pushed the dev/shared/partition_reduce_then_scan branch from edf26c5 to 1ae6489 Compare August 6, 2024 19:03
@danhoeflinger danhoeflinger force-pushed the dev/shared/copy_if_reduce_then_scan branch from 522d0af to 6696396 Compare August 6, 2024 20:51
@danhoeflinger danhoeflinger force-pushed the dev/shared/partition_reduce_then_scan branch from 1ae6489 to aae11db Compare August 6, 2024 20:51
@danhoeflinger danhoeflinger force-pushed the dev/shared/copy_if_reduce_then_scan branch from 6696396 to f757df5 Compare August 6, 2024 20:59
@danhoeflinger danhoeflinger force-pushed the dev/shared/partition_reduce_then_scan branch from aae11db to 207bfed Compare August 6, 2024 20:59
@danhoeflinger danhoeflinger changed the title [Draft] Make Partition family use reduce_then_scan algorithm [Draft] Make Partition family of APIs use reduce_then_scan algorithm Aug 6, 2024
@danhoeflinger danhoeflinger force-pushed the dev/shared/copy_if_reduce_then_scan branch from f757df5 to 3301a89 Compare August 7, 2024 14:48
@danhoeflinger danhoeflinger force-pushed the dev/shared/copy_if_reduce_then_scan branch from 81d9e2b to e35fe10 Compare August 22, 2024 22:13
@danhoeflinger danhoeflinger force-pushed the dev/shared/partition_reduce_then_scan branch from 8f2cd6a to 44bab2f Compare August 22, 2024 22:13
@danhoeflinger danhoeflinger force-pushed the dev/shared/copy_if_reduce_then_scan branch from e35fe10 to d318354 Compare August 23, 2024 00:57
@danhoeflinger danhoeflinger force-pushed the dev/shared/partition_reduce_then_scan branch from 44bab2f to a93f24f Compare August 23, 2024 00:57
@danhoeflinger danhoeflinger force-pushed the dev/shared/copy_if_reduce_then_scan branch from d318354 to 1da7875 Compare August 27, 2024 17:47
@danhoeflinger danhoeflinger force-pushed the dev/shared/partition_reduce_then_scan branch from a93f24f to cf5a6be Compare August 27, 2024 17:53
Copy link
Contributor

@julianmi julianmi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. I would hold off merging this until the main patch was merged.

@danhoeflinger danhoeflinger force-pushed the dev/shared/copy_if_reduce_then_scan branch from 1da7875 to 8601892 Compare August 29, 2024 16:31
@danhoeflinger danhoeflinger force-pushed the dev/shared/partition_reduce_then_scan branch from cf5a6be to c8298cb Compare August 29, 2024 16:34
Copy link
Contributor Author

@danhoeflinger danhoeflinger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This one also LGTM, after rebasing.

@danhoeflinger danhoeflinger force-pushed the dev/shared/copy_if_reduce_then_scan branch from 8601892 to df02a01 Compare August 29, 2024 20:19
@danhoeflinger danhoeflinger force-pushed the dev/shared/partition_reduce_then_scan branch from c8298cb to 040a1ef Compare August 29, 2024 20:20
@danhoeflinger danhoeflinger force-pushed the dev/shared/copy_if_reduce_then_scan branch from df02a01 to 75c55c4 Compare August 30, 2024 15:46
julianmi
julianmi previously approved these changes Aug 30, 2024
Copy link
Contributor

@julianmi julianmi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM after a rebase.

Base automatically changed from dev/shared/copy_if_reduce_then_scan to main August 30, 2024 19:15
@danhoeflinger danhoeflinger dismissed julianmi’s stale review August 30, 2024 19:15

The base branch was changed.

@danhoeflinger danhoeflinger force-pushed the dev/shared/partition_reduce_then_scan branch from 040a1ef to bd6aba6 Compare August 30, 2024 19:19
Copy link
Contributor

@mmichel11 mmichel11 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@danhoeflinger danhoeflinger merged commit 0c09dac into main Aug 30, 2024
19 checks passed
@danhoeflinger danhoeflinger deleted the dev/shared/partition_reduce_then_scan branch August 30, 2024 19:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants